package DAO;

import common.Enums.DAOType;

import MySQLConnection.MySqlDAOFactory;

public abstract class DAOFactory 
{
	public abstract BcDAO getBcDAO();
	public abstract CaseDAO getCaseDAO();
	public abstract ValueDAO getValueDAO();
	public abstract MethodDAO getMethodDAO();
	public abstract SolutionDAO getSolutionDAO();
	public abstract FormulaDAO getFormulaDAO();
	public abstract CriterionDAO getCriterionDAO();
	public abstract MetAppDAO getMetAppDAO();
	public abstract void commitChanges();
	public abstract void rollbackChanges();
	public abstract void setAutoCommit(boolean autoCommit);
	
	public static DAOFactory getDAOFactory(DAOType type) 
	{
		switch (type)
		{
			case MYSQL:
				return MySqlDAOFactory.getInstance();
			default : 
				return null;
	    }
	}
		      
}
